<template>
    <div class="app-table">
        <div class="app-body">

            <div class="staticBox">
                <div class="staticBox_top flex">
                    <div class="totalBox">
                        <p class="totalBox_pTotal ">{{ statisticsData.NumberOfPeople }}</p>
                        <div class="totalBox_person flex">
                            <img src="../../assets/reviveCollect_icon2.png" alt="">
                            <p>报名总数(人)</p>
                        </div>
                    </div>
                    <div class="shu_line"></div>
                    <div class="totalBox">
                        <p class="totalBox_pTotal ">{{ statisticsData.ActualNumberOfAdmissions }}</p>
                        <div class="totalBox_person flex">
                            <img src="../../assets/reviveCollect_icon2.png" alt="">
                            <p>实录人数(人)</p>
                        </div>
                    </div>
                    <div class="shu_line"></div>
                    <div class="totalBox">
                        <p class="totalBox_pTotal ">{{ statisticsData.TotalPayableAmount }}</p>
                        <div class="totalBox_person flex">
                            <img src="../../assets/reviveCollect_icon3.png" alt="">
                            <p>收费总额(元)</p>
                        </div>
                    </div>
                </div>

                <div class="flexBox">
                    <div class="typeCard">
                        <div class="typeCard_type flex">
                            <div class="type_line"></div>
                            <p>物化生</p>
                        </div>
                        <div class="typeCard_total flex">
                            <div>
                                <p class="p_Total ">{{ statisticsData.PayAndCourseCountWHS }}</p>
                                <p class="p_personal">缴费人数（人）</p>
                            </div>
                            <div>
                                <p class="p_Total ">{{ statisticsData.payRefundCountWHS }}</p>
                                <p class="p_personal">退费人数（人）</p>
                            </div>
                            <div>
                                <p class="p_Total ">{{ statisticsData.payCountWHS }}</p>
                                <p class="p_personal">实录人数（人）</p>
                            </div>
                        </div>
                        <div class="typeBox">
                            <div class="typeCard_title flex">
                                <img src="../../assets/reviveCollect_icon4.png" alt="">
                                <p>缴费情况</p>
                            </div>
                            <div class="typeBox_main flex">
                                <div>
                                    <p class="amount ">{{ statisticsData.TotalPayableAmountWHS }}(元)</p>
                                    <p class="amountTip">缴费金额</p>
                                </div>
                                <div>
                                    <p class="amount ">{{ statisticsData.totalRefundAmountWHS }}(元)</p>
                                    <p class="amountTip">退费金额</p>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="typeCard typeCard1">
                        <div class="typeCard_type flex">
                            <div class="type_line"></div>
                            <p>物化地</p>
                        </div>
                        <div class="typeCard_total flex">
                            <div>
                                <p class="p_Total ">{{ statisticsData.PayAndCourseCountWHD }}</p>
                                <p class="p_personal">缴费人数（人）</p>
                            </div>
                            <div>
                                <p class="p_Total ">{{ statisticsData.payRefundCountWHD }}</p>
                                <p class="p_personal">退费人数（人）</p>
                            </div>
                            <div>
                                <p class="p_Total ">{{ statisticsData.payCountWHD }}</p>
                                <p class="p_personal">实录人数（人）</p>
                            </div>
                        </div>
                        <div class="typeBox typeBox1">
                            <div class="typeCard_title flex">
                                <img src="../../assets/reviveCollect_icon4.png" alt="">
                                <p>缴费情况</p>
                            </div>
                            <div class="typeBox_main flex">
                                <div>
                                    <p class="amount amount1 ">{{ statisticsData.TotalPayableAmountWHD }}(元)</p>
                                    <p class="amountTip amountTip1">缴费金额</p>
                                </div>
                                <div>
                                    <p class="amount amount1 ">{{ statisticsData.totalRefundAmountWHD }}(元)</p>
                                    <p class="amountTip amountTip1">退费金额</p>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="typeCard">
                        <div class="typeCard_type flex">
                            <div class="type_line"></div>
                            <p>物化政</p>
                        </div>
                        <div class="typeCard_total flex">
                            <div>
                                <p class="p_Total ">{{ statisticsData.PayAndCourseCountWHZ }}</p>
                                <p class="p_personal">缴费人数（人）</p>
                            </div>
                            <div>
                                <p class="p_Total ">{{ statisticsData.payRefundCountWHZ }}</p>
                                <p class="p_personal">退费人数（人）</p>
                            </div>
                            <div>
                                <p class="p_Total ">{{ statisticsData.payCountWHZ }}</p>
                                <p class="p_personal">实录人数（人）</p>
                            </div>
                        </div>
                        <div class="typeBox">
                            <div class="typeCard_title flex">
                                <img src="../../assets/reviveCollect_icon4.png" alt="">
                                <p>缴费情况</p>
                            </div>
                            <div class="typeBox_main flex">
                                <div>
                                    <p class="amount ">{{ statisticsData.TotalPayableAmountWHZ }}(元)</p>
                                    <p class="amountTip">缴费金额</p>
                                </div>
                                <div>
                                    <p class="amount ">{{ statisticsData.totalRefundAmountWHZ }}(元)</p>
                                    <p class="amountTip">退费金额</p>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>


                <!-- <div style="height: 75px;"></div> -->
                <!-- <button class="downLoad" @click="downLoad">下载</button> -->
            </div>



        </div>
        <!-- <bottomView></bottomView> -->
    </div>
</template>
<script>
import { ElConfigProvider, ElMessageBox, ElMessage } from "element-plus";
import zhCn from "element-plus/lib/locale/lang/zh-cn";
import { httpService } from "@/utils/httpService";
import { Picture as IconPicture, Upload } from "@element-plus/icons-vue";
import bottomView from "@/components/bottom.vue";
import * as echarts from 'echarts';
export default {
    name: "ReviewStudentListView",
    data() {
        return {
            type: 0,
            title: "",
            page: 1,
            pageSize: 10,
            total: 0,
            limit: 10,
            list: [],
            name: "",
            changeData: [],
            payStatus: "",
            form: {
                name: "",
            },
            statisticsData: {},

        };
    },
    components: {
        IconPicture,
        ElConfigProvider,
        ElMessageBox,
        bottomView,
        ElMessage,
    },
    setup() {
        return {
            locale: zhCn,
        };
    },
    mounted() {
        this.getReviewStudentList();
        // this.getEcharts()
    },
    methods: {

        // getEcharts(statisticsData) {
        //     var chartDom = document.querySelector('.echarts_box');
        //     var myChart = echarts.init(chartDom);
        //     var option;

        //     // var datas = [
        //     //     { name: '物化生缴费金额', value: 686440 },
        //     //     { name: '物化地实录人数', value: 37 },
        //     //     { name: '物化地缴费人数', value: 37 },
        //     //     { name: '物化地退费金额', value: 0 },
        //     //     { name: '物化地退费人数', value: 0 },
        //     //     { name: '物化政实录人数', value: 47 },
        //     //     { name: '实录人数', value: 181 },
        //     //     { name: '物化政缴费人数', value: 47 },
        //     //     { name: '物化政退费金额', value: 0 },
        //     //     { name: '收费总额', value: 1401975 },
        //     //     { name: '物化生实录人数', value: 96 },
        //     //     { name: '物化生缴费人数', value: 97 },
        //     //     { name: '物化地缴费金额', value: 300835 },
        //     //     { name: '物化政退费人数', value: 0 },
        //     //     { name: '物化生退费金额', value: 7500 },
        //     //     { name: '报名总数', value: 1122 },
        //     //     { name: '物化政缴费金额', value: 414700 },
        //     //     { name: '物化生退费人数', value: 1 }
        //     // ]

        //     option = {
        //         xAxis: {
        //             type: 'category',
        //             data: [
        //                 "报名总数", "实录人数", "收费总额",
        //                 "物化生缴费人数", "物化生退费人数", "物化生实录人数", "物化生缴费金额", "物化生退费金额",
        //                 "物化地缴费人数", "物化地退费人数", "物化地实录人数", "物化地缴费金额", "物化地退费金额",
        //                 "物化政缴费人数", "物化政退费人数", "物化政实录人数", "物化政缴费金额", "物化政退费金额",
        //             ],
        //             axisLabel: {
        //                 rotate: -30 // 旋转30度
        //             }

        //         },
        //         yAxis: {
        //             type: 'value'
        //         },
        //         series: [
        //             {
        //                 data: statisticsData,
        //                 type: 'bar',
        //                 showBackground: true,
        //                 backgroundStyle: {
        //                     color: 'rgba(180, 180, 180, 0.2)'
        //                 }
        //             }
        //         ]
        //     };
        //     option && myChart.setOption(option);
        // },

        exportExcel(data, fileName) {
            let link = document.createElement('a'), fileUrl = window.URL.createObjectURL(new Blob([data]));
            link.style.display = 'none';
            link.href = fileUrl;
            link.setAttribute('download', fileName + '.xlsx');
            document.body.appendChild(link);
            link.click();
            document.body.removeChild(link);
            window.URL.revokeObjectURL(fileUrl)
        },


        getReviewStudentList() {
            httpService(
                "/javaApi/reviewStudentForm/statistics", {}, "get"
            ).then((data) => {
                this.statisticsData = data
                this.list = [data]
                let result = []

                // for (var key in data) {
                //     console.log({ name: name, value: data[key] });
                //     if (key === 'NumberOfPeople') {
                //         result.push({ name: "报名总数(人)", value: data[key], id: 1 });
                //     }
                //     if (key === 'ActualNumberOfAdmissions') {
                //         result.push({ name: "实录人数(人)", value: data[key], id: 2 });
                //     }
                //     if (key === 'TotalPayableAmount') {
                //         result.push({ name: "收费总额(元)", value: data[key], id: 3 });
                //     }

                //     if (key === 'PayAndCourseCountWHS') {
                //         result.push({ name: "物化生缴费人数(人)", value: data[key], id: 4 });
                //     }
                //     if (key === 'payRefundCountWHS') {
                //         result.push({ name: "物化生退费人数(人)", value: data[key], id: 5 });
                //     }
                //     if (key === 'payCountWHS') {
                //         result.push({ name: "物化生实录人数(人)", value: data[key], id: 6 });
                //     }
                //     if (key === 'TotalPayableAmountWHS') {
                //         result.push({ name: "物化生缴费金额(元)", value: data[key], id: 7 });
                //     }
                //     if (key === 'totalRefundAmountWHS') {
                //         result.push({ name: "物化生退费金额(元)", value: data[key], id: 8 });
                //     }

                //     if (key === 'PayAndCourseCountWHD') {
                //         result.push({ name: "物化地缴费人数(人)", value: data[key], id: 9 });
                //     }
                //     if (key === 'payRefundCountWHD') {
                //         result.push({ name: "物化地退费人数(人)", value: data[key], id: 10 });
                //     }
                //     if (key === 'payCountWHD') {
                //         result.push({ name: "物化地实录人数(人)", value: data[key], id: 11 });
                //     }
                //     if (key === 'TotalPayableAmountWHD') {
                //         result.push({ name: "物化地缴费金额(元)", value: data[key], id: 12 });
                //     }
                //     if (key === 'totalRefundAmountWHD') {
                //         result.push({ name: "物化地退费金额(元)", value: data[key], id: 13 });
                //     }

                //     if (key === 'PayAndCourseCountWHZ') {
                //         result.push({ name: "物化政缴费人数(人)", value: data[key], id: 14 });
                //     }
                //     if (key === 'payRefundCountWHZ') {
                //         result.push({ name: "物化政退费人数(人)", value: data[key], id: 15 });
                //     }
                //     if (key === 'payCountWHZ') {
                //         result.push({ name: "物化政实录人数(人)", value: data[key], id: 16 });
                //     }
                //     if (key === 'TotalPayableAmountWHZ') {
                //         result.push({ name: "物化政缴费金额(元)", value: data[key], id: 17 });
                //     }
                //     if (key === 'totalRefundAmountWHZ') {
                //         result.push({ name: "物化政退费金额(元)", value: data[key], id: 18 });
                //     }
                // }

                // const sortedData = result.sort((a, b) => a.id - b.id);
                // const valuesArray = sortedData.map(item => item.value);
                // this.getEcharts(valuesArray)
                // this.getEcharts(result)
            });
        },
    },
};
</script>
<style scoped>
* {
    margin: 0;
    padding: 0;
}

.app-table {
    background: #eff3f5;
    padding: 5px 10px 0px;
}


.app-body {
    background: white;
    padding: 20px 20px 10px 20px;
    margin-bottom: 10px;
    min-height: calc(100vh - 145px);
}

.flex {
    display: flex;
    align-items: center;
}

.echarts_box {
    width: 800px;
    height: 800px;
}

.staticBox {
    margin: 0 15px;
}

.staticBox_top {
    justify-content: space-around;
    height: 100px;
    width: 1240px;
    background: linear-gradient(to bottom, rgb(228, 239, 248) 60%, #FFF);
    background-size: 100% 100%;
    border-radius: 10px;
    margin-bottom: 20px
}

.totalBox {
    text-align: center;
    color: #8B9CA0;
    font-size: 14px;
    width: calc((100% - 3px) / 3);
}

.totalBox img {
    width: 20px;
}

.shu_line {
    width: 1px !important;
    height: 80%;
    background-color: rgba(255, 255, 255, 0.6);
}

.totalBox_pTotal {
    font-size: 24px;
    color: #000;
    height: 35px;
    line-height: 35px;
    font-weight: bold;
}

.totalBox_person {
    justify-content: center;
}

.totalBox_person img {
    width: 20px;
    margin-right: 5px;
}

.typeCard {
    background: linear-gradient(to bottom, #F2F9FF 10%, #FFF 20%);
    margin-top: 15px;
    border-radius: 8px;
    padding-bottom: 15px;
    width: 400px;
    margin-right: 20px;
}

.typeCard:last-child {
    margin-right: 0;
}

.typeCard1 {
    background: linear-gradient(to bottom, #FFF1F1 10%, #FFF 30%);
}

.typeCard_type {
    color: #000;
    font-size: 16px;
    font-weight: bold;
    padding: 20px 0 0 15px;
}

.type_line {
    height: 14px;
    width: 3px;
    background-color: #3F99E8;
    border-radius: 2px;
    margin-right: 7px;
}

.typeCard_total {
    justify-content: space-evenly;
    text-align: center;
    margin-top: 15px;
}

.p_Total {
    font-size: 22px;
    color: #000;
    height: 30px;
    line-height: 30px;
    font-weight: bold;
}

.p_personal {
    color: #666;
    font-size: 12px;
}

.typeBox {
    background: linear-gradient(to right, #F2F9FF 30%, #FFF 80%);
    margin: 15px 15px 0;
    padding: 10px;
    border-radius: 8px;
}

.typeBox1 {
    background: linear-gradient(to right, #FFF1F1 20%, #FFF);
}

.typeCard_title {
    color: #000;
    font-size: 16px;
    font-weight: bold;
}

.typeCard_title img {
    width: 23px;
    margin-right: 8px;
}

.typeBox_main {
    justify-content: space-around;
    text-align: center;
    padding: 15px 0 5px 0;
}

.amount {
    font-size: 17px;
    color: #000;
    font-weight: bold;
}

.amount1 {
    color: #671303 !important;
}

.amountTip {
    color: #000000;
    font-size: 14px;
    margin-top: 10px;
}

.amountTip1 {
    color: #7A3C38 !important;
}

.downLoad {
    width: calc(100% - 30px);
    height: 45px;
    background-color: #1D9BFB;
    color: #fff;
    font-size: 17px;
    border: none;
    border-radius: 8px;
    position: fixed;
    left: 15px;
    bottom: 30px;
}

.flexBox {
    width: 1240px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    /* display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px; */
}
</style>
